import request from './request'

export const fetchAllArticles = (query) => {
    return request({
        url: '/article/getAll',
        method: 'GET',
        data: query
    })
}

export const submitArticle = (query) => {
    return request({
        url: '/article/addArticle',
        method: 'POST',
        data: query
    })
}

export const selectArticleById = (query) => {
    return request({
        url: `/article/getArticleById/${query}`,
        method: 'GET',
        data: query
    })
}

export const deleteArticleById = (query) => {
    return request({
        url: `/article/removeArticleById/${query}`,
        method: 'DELETE',
        data: query
    })
}
